home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / H-I / HyperHackers.cpt / Hyper-Hackers Queue 1.0 / card_10998.txt < prev    next >
Text File  |  1989-02-26  |  1KB  |  50 lines

  1. -- card: 10998 from stack: in.0
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 3797
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 1
  9. ----- text -----
  10.  
  11. Date:       Mon, 14 Dec 87 21:03:25 PST
  12. From: PUGH@NMFECC.ARPA
  13.  
  14.  
  15. Well, I may have the first instance of Undo in a Hypercard stack.  This just 
  16. came to me and I wonder why I haven't heard of it in any other stacks.
  17.  
  18. on doMenu x
  19.   if x is "Undo" then
  20.     global changedStuff, whatChanged
  21.     put whatChanged into temp
  22.     put changedStuff into whatChanged
  23.     put temp into changedStuff
  24.   else
  25.     pass doMenu
  26.   end if
  27. end doMenu
  28.  
  29. And in a button or other script somewhere :
  30.  
  31. global changedStuff, whatChanged
  32. put the name of ??? into whatChanged
  33. put whatChanged into changedStuff
  34. put ??? into whatchanged
  35. ...
  36.  
  37. You get the idea, I assume...
  38.  
  39. By using some global variables and placing this in your stack script, you can 
  40. implement Undo with the best of them.  Set some condition under which you can 
  41. Undo, and you can call Hypercard if you can't Undo.  It's great!  
  42.  
  43. I just thought I should remind everyone that just cause it's Hypercard doesn't
  44. mean it has to be unstandard! 
  45.  
  46.  
  47.  
  48. -- part contents for background part 45
  49. ----- text -----
  50. Undo Your Stacks!